
TARGET=incheck
OBJECTS= \
	parseArgs.o \
	checkFile.o \
	loadFile.o \
	errors.o \
	headers.o

# ! NO CHANGES BELOW !

SOURCES= $(TARGET).c $(OBJECTS:.o=.c)
HEADERS= $(OBJECTS:.o=.h)

CC=gcc
CFLAGS=-g -Wall -w -ansi -pedantic
CPPFLAGS=-I.

RM=rm -f

.PHONY: all clean depend

# Begin targets

all:$(TARGET)

clean:
	$(RM) $(TARGET) $(TARGET).o $(OBJECTS) depend

$(TARGET):  $(TARGET).o $(OBJECTS)
	$(CC) $(CFLAGS) $^ -o $@

$(OBJECTS) $(TARGET).o: $(SOURCES)
	$(CC) $(CFLAGS) -c $^

depend: $(SOURCES) $(HEADERS)
	$(CC) $(CPPFLAGS) -MM $(SOURCES) > $@

-include depend
